package com.example.exception;

import com.example.utils.ResultCodeUtil;
import lombok.Getter;

@Getter
public class ServiceException extends RuntimeException {
    private ResultCodeUtil code;
    private String description;

    public ServiceException(ResultCodeUtil code, String message) {
        super(message);
        this.code = code;
    }

    public ServiceException(ResultCodeUtil code, String message, String description) {
        super(code.getMessage());
        this.description = description;
        this.code = code;
    }

    public ServiceException(String message) {
        super(message);
    }

    public ServiceException(ResultCodeUtil code) {
        super(code.getMessage());
        this.code = code;
    }

}
